Microsoft excels got kind of basic level functions things like some an average a minimum and maximum
.
And then it's got things that are more advanced things like the IF function that we look up function
and a number of other more advanced type functions.
And in some cases kind of like when we took a look at an earlier video.
They combined some of these basic ones with more advanced ones.
We took a look at earlier the kilt function.
I want to count a group of cells.
If this is true well we've also got a sum that if I want to sum up a group of cells if this condition
is true a standard sum just sums up a group of cells whatever you specify that's what is going to some
well some if I'm going to grab a range of cells for example I'll grab all the sales here from D-3 all
the way down to that's going to keep going here.
Few hundred records down to D to 72.
That's the range of cells and I want to sum up.
But you know what let's get back up here to the top.
I don't want to sum up every single sale.
I just want to sum up for specific stores or specific month or specific skew.
I only want to sum up if a specific condition is true.
Take a look this is the SUM function.
So off to the right.
I'm on the SUM function worksheet.
I've got this nice little simple table built here just to help demonstrate this.
This function.
So I'm in a click in the cell H-3.
I want to get the total units.
And this is the total units column here.
But I only want to do it for a specific store or I want to get the total sales.
Here's the sales column we are looking at this earlier but only for the store.
Some have watched this Simas out of H-3.
I'm going to do the units.
I'm going to go to my formulas tab.
Now I can dig through the books.
We thought well you know it's gone.
If so maybe it's very logical now that they're.
Well it's a subfunctions So maybe it's under math and trig like you scroll through here and under there
.
Yes.
Is there some there's some.
And hey by the way right below some if we have some F's you can specify multiple sets of conditions
or criteria.
I want to sum up if this is true and this is true and this is true and so on.
Let's take a look at the more basic of the two.
Let's grab the sum.
If so once again this opens up my argument window three things wants to know the range of cells that
I want to evaluate.
This is the if portion of the sum.
Hey I want to look at the store column and check to see if it's equal to 3000.
So my range here I'm in a grab from B-3.
Let me give a give you a little shortcut key here.
I need to get all the way down that road number 272 right.
So I mean you control shift on my keyboard and the down arrow on my keyboard and it's all jump all the
way to the bottom.
Don't find that empty cell and it stops.
So there's the range that I want to evaluate.
That's what I'm going to look for the specific store.
Now my criteria.
Well great that's that's the range of cells read up above B-3 to be 272.
What am I looking for.
Well I want to look for store number three thousand one to three.
All right.
Now what do we want to sum up.
I want to point out you're going to scroll back to the top.
I want to point out in the argument window no notice that range and criteria are different than some
range.
You Spot The Difference.
What's the difference between these three here.
Well range.
Criteria are bold some range is done when it's not pulled.
This designates this particular argument as being optional.
I don't have to do it which means if I don't use it and actually sums up the range that you cited initially
you know that's not what I want the range that I want to sum up I'm trying to get total units.
So I'm going to come over here and get B-3 or E-3 excuse me E-3 control shift down or go down to eat
272 and that's it.
Three things.
What's the range that you're looking into the one that you're trying to evaluate what am I looking for
is the criteria.
And what's the range of cells that you actually want to sum up if that criteria is true.
It may ok button and you that.
Seventeen thousand five hundred thirty eight units that are stored or have been sold from store number
three thousand really simple three little things.
Where am I looking.
What am I looking for and what am I going to sum up if I find it.
This is the sumif.
Try this out complete the rest of these examples here.
Get the total sales per store number three thousand get total units total sales for the specific skew
.
Try it out.
Mess around with it.
Think about your own work.
Where do you apply this.
Do you ever need to sum up a range of cells but only where a specific condition is true.
You'll be using a some if function